console.log("hello word")

for(let i = 0 ; i<5 ;i++){
    if(i==3){
        console.log(i)
    }else{
        console.log("错误")
    }
}


let date = new Date('2020/10/10 23:59:59')
setInterval(()=>{
    var current = date.getTime() - 1000
    date =  new Date(current)
    if (current >= dates) {
        console.log(dates.toLocaleString());
    } else {
        clearInterval(timer)
    }
    console.log(date.toLocaleString());
},1000)

let students = ['吴','张','李','杨','苏','王']

function getName(){
    let random = Math.random()*students.length
    let zsRandom = Math.floor(random)
    let name = students.splice(zsRandom,1)
    return name
}


timer = setInterval(()=>{
    let arr = getName()
    if(arr.length<=0){
        clearInterval(timer)
    }else{
        console.log(arr[0]);
    }
  
},1000)

